package tmproject.hlhj.fhp.cartrans.presenter

import android.content.Context
import com.example.mymvp.BasePresenter
import tmproject.hlhj.fhp.cartrans.IView.NoticeView
import tmproject.hlhj.fhp.cartrans.javaBean.NoticeListBean
import tmproject.hlhj.fhp.cartrans.modules.NoticeModule

/**
 * Created by Never Fear   on 2018\8\28 0028.
Never More....
 */
class NoticePresenter :BasePresenter<NoticeModule,NoticeView>(), NoticeModule.OnNoticeListener {

    override fun gotNotices(noticeListBean: NoticeListBean) {
        view?.setNoticeList(noticeListBean)
    }

    fun getNotices(c:Context,token:String?,page:Int){
        module.getNotices(c,token,page)
    }

    override fun createModule() {
        module= NoticeModule()
        module.listener=this
    }

    override fun noMore() {
        view?.noMore()
    }
}